<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="UITextField属性 ####0.enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话，右下角的返回按钮是disabled的。 ####1.borderStyle设置边框样式，只有设置了才会显示边框样式　1234567text.borderStyle = UITextBorderStyleRoundedRect;　typedef">
<meta name="keywords" content="Android、iOS、Web、React Native">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS-UITextField(编辑框)">
<meta property="og:url" content="http://yoursite.com/blog/2018/08/06/iOS-UI/iOS-UITextField(编辑框)/index.html">
<meta property="og:site_name" content="凌浩雨_博客">
<meta property="og:description" content="UITextField属性 ####0.enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话，右下角的返回按钮是disabled的。 ####1.borderStyle设置边框样式，只有设置了才会显示边框样式　1234567text.borderStyle = UITextBorderStyleRoundedRect;　typedef">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-08-06T10:53:08.505Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="iOS-UITextField(编辑框)">
<meta name="twitter:description" content="UITextField属性 ####0.enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话，右下角的返回按钮是disabled的。 ####1.borderStyle设置边框样式，只有设置了才会显示边框样式　1234567text.borderStyle = UITextBorderStyleRoundedRect;　typedef">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/blog/2018/08/06/iOS-UI/iOS-UITextField(编辑框)/"/>





  <title>iOS-UITextField(编辑框) | 凌浩雨_博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="default">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">凌浩雨_博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/blog/2018/08/06/iOS-UI/iOS-UITextField(编辑框)/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="凌浩雨">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="凌浩雨_博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">iOS-UITextField(编辑框)</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-08-06T18:01:38+08:00">
                2018-08-06
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>UITextField属性</p>
<p>####0.enablesReturnKeyAutomatically<br>默认为No,如果设置为Yes,文本框中没有输入任何字符的话，右下角的返回按钮是disabled的。</p>
<p>####1.borderStyle<br>设置边框样式，只有设置了才会显示边框样式　<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">text.borderStyle = UITextBorderStyleRoundedRect;</span><br><span class="line">　typedef enum &#123;</span><br><span class="line">  UITextBorderStyleNone, </span><br><span class="line">  UITextBorderStyleLine,</span><br><span class="line">  UITextBorderStyleBezel,</span><br><span class="line">  UITextBorderStyleRoundedRect  </span><br><span class="line">&#125; UITextBorderStyle;</span><br></pre></td></tr></table></figure></p>
<a id="more"></a>
<p>####2.backgroundColor　<br>设置输入框的背景颜色，此时设置为白色 如果使用了自定义的背景图片边框会被忽略掉　<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">　 text.backgroundColor = [UIColor whiteColor];</span><br></pre></td></tr></table></figure></p>
<p>####3.background<br>设置背景<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.background = [UIImage imageNamed:@&quot;dd.png&quot;];//UITextField 的背景，注意只有UITextBorderStyleNone的时候改属性有效</span><br></pre></td></tr></table></figure></p>
<p>设置enable为no时，textfield的背景<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.disabledBackground = [UIImage imageNamed:@&quot;cc.png&quot;];</span><br></pre></td></tr></table></figure></p>
<p>####4.placeholder<br>当输入框没有内容时， 提示内容为password<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.placeholder = @&quot;password&quot;;</span><br></pre></td></tr></table></figure></p>
<p>####5.font<br>设置输入框内容的字体样式和大小<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.font = [UIFont fontWithName:@&quot;Arial&quot; size:20.0f];</span><br></pre></td></tr></table></figure></p>
<p>####6. textColor<br>设置字体颜色<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.textColor = [UIColor redColor];</span><br></pre></td></tr></table></figure></p>
<p>####7. clearButtonMode<br>输入框中是否有个叉号，在什么时候显示，用于一次性删除输入框中的内容<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">  text.clearButtonMode = UITextFieldViewModeAlways; </span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UITextFieldViewModeNever,　重不出现</span><br><span class="line">    UITextFieldViewModeWhileEditing, 编辑时出现</span><br><span class="line">    UITextFieldViewModeUnlessEditing,　除了编辑外都出现</span><br><span class="line">    UITextFieldViewModeAlways 　一直出现</span><br><span class="line">&#125; UITextFieldViewMode;</span><br></pre></td></tr></table></figure></p>
<p>####8. text<br>输入框中一开始就有的文字<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.text = @&quot;一开始就在输入框的文字&quot;;</span><br></pre></td></tr></table></figure></p>
<p>####9. secureTextEntry<br>每输入一个字符就变成点 用来输入密码时，设置这个属性。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.secureTextEntry = YES;</span><br></pre></td></tr></table></figure></p>
<p>####10. autocorrectionType<br>是否纠错<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">  text.autocorrectionType = UITextAutocorrectionTypeNo;</span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UITextAutocorrectionTypeDefault, 默认</span><br><span class="line">    UITextAutocorrectionTypeNo, 　不自动纠错</span><br><span class="line">    UITextAutocorrectionTypeYes,　自动纠错</span><br><span class="line">&#125; UITextAutocorrectionType;</span><br></pre></td></tr></table></figure></p>
<p>####11. clearsOnBeginEditing<br>再次编辑就清空<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.clearsOnBeginEditing = YES;</span><br></pre></td></tr></table></figure></p>
<p>####12. textAlignment<br>内容对齐方式<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.textAlignment = UITextAlignmentLeft;</span><br></pre></td></tr></table></figure></p>
<p>####13. contentVerticalAlignment<br>内容的垂直对齐方式  UITextField继承自UIControl,此类中有一个属性contentVerticalAlignment<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;</span><br></pre></td></tr></table></figure></p>
<p>####14. adjustsFontSizeToFitWidth<br>设置为YES时文本会自动缩小以适应文本窗口大小.默认是保持原来大小,而让长文本滚动　<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">  textFied.adjustsFontSizeToFitWidth = YES;</span><br><span class="line">//设置自动缩小显示的最小字体大小</span><br><span class="line">  text.minimumFontSize = 20;</span><br></pre></td></tr></table></figure></p>
<p>####15. keyboardType<br>设置键盘的样式<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">  text.keyboardType = UIKeyboardTypeNumberPad;</span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UIKeyboardTypeDefault,     　默认键盘，支持所有字符         </span><br><span class="line">    UIKeyboardTypeASCIICapable,　支持ASCII的默认键盘</span><br><span class="line">    UIKeyboardTypeNumbersAndPunctuation,　标准电话键盘，支持＋＊＃字符</span><br><span class="line">    UIKeyboardTypeURL,            URL键盘，支持.com按钮 只支持URL字符</span><br><span class="line">UIKeyboardTypeNumberPad,            　数字键盘</span><br><span class="line">UIKeyboardTypePhonePad,　 　电话键盘</span><br><span class="line">    UIKeyboardTypeNamePhonePad, 　电话键盘，也支持输入人名</span><br><span class="line">UIKeyboardTypeEmailAddress, 　用于输入电子 邮件地址的键盘     </span><br><span class="line">UIKeyboardTypeDecimalPad,   　数字键盘 有数字和小数点</span><br><span class="line">    UIKeyboardTypeTwitter,      　优化的键盘，方便输入@、#字符</span><br><span class="line">    UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, </span><br><span class="line">&#125; UIKeyboardType;</span><br></pre></td></tr></table></figure></p>
<p>####16.autocapitalizationType<br>首字母是否大写<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">  text.autocapitalizationType = UITextAutocapitalizationTypeNone;</span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UITextAutocapitalizationTypeNone, 不自动大写</span><br><span class="line">    UITextAutocapitalizationTypeWords,　单词首字母大写</span><br><span class="line">    UITextAutocapitalizationTypeSentences,　句子的首字母大写</span><br><span class="line">    UITextAutocapitalizationTypeAllCharacters, 所有字母都大写</span><br><span class="line">&#125; UITextAutocapitalizationType;</span><br></pre></td></tr></table></figure></p>
<p>####17. returnKeyType<br>return键变成什么键<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"> text.returnKeyType =UIReturnKeyDone;</span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UIReturnKeyDefault, 默认 灰色按钮，标有Return</span><br><span class="line">    UIReturnKeyGo,    　标有Go的蓝色按钮</span><br><span class="line">    UIReturnKeyGoogle,标有Google的蓝色按钮，用语搜索</span><br><span class="line">    UIReturnKeyJoin,标有Join的蓝色按钮</span><br><span class="line">    UIReturnKeyNext,标有Next的蓝色按钮</span><br><span class="line">    UIReturnKeyRoute,标有Route的蓝色按钮</span><br><span class="line">    UIReturnKeySearch,标有Search的蓝色按钮</span><br><span class="line">    UIReturnKeySend,标有Send的蓝色按钮</span><br><span class="line">    UIReturnKeyYahoo,标有Yahoo的蓝色按钮</span><br><span class="line">    UIReturnKeyYahoo,标有Yahoo的蓝色按钮</span><br><span class="line">    UIReturnKeyEmergencyCall, 紧急呼叫按钮</span><br><span class="line">&#125; UIReturnKeyType;</span><br></pre></td></tr></table></figure></p>
<p>####18. keyboardAppearance<br>键盘外观<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">textView.keyboardAppearance=UIKeyboardAppearanceDefault；</span><br><span class="line">typedef enum &#123;</span><br><span class="line">UIKeyboardAppearanceDefault， 默认外观，浅灰色</span><br><span class="line">UIKeyboardAppearanceAlert，　 　深灰 石墨色</span><br><span class="line">&#125; UIReturnKeyType;</span><br></pre></td></tr></table></figure></p>
<h4 id="19-delegate"><a href="#19-delegate" class="headerlink" title="19. delegate"></a>19. delegate</h4><p>设置代理 用于实现协议<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.delegate = self;</span><br></pre></td></tr></table></figure></p>
<p>####20.  rightView<br>最右侧加图片是以下代码　 左侧类似<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">    UIImageView *image=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@&quot;right.png&quot;]];</span><br><span class="line">    text.rightView=image;</span><br><span class="line">    text.rightViewMode = UITextFieldViewModeAlways; </span><br><span class="line">typedef enum &#123;</span><br><span class="line">    UITextFieldViewModeNever,</span><br><span class="line">    UITextFieldViewModeWhileEditing,</span><br><span class="line">    UITextFieldViewModeUnlessEditing,</span><br><span class="line">    UITextFieldViewModeAlways</span><br><span class="line">&#125; UITextFieldViewMode;</span><br></pre></td></tr></table></figure></p>
<p>####21. editing<br>是否允许编辑。</p>
<p>####22.界面重写绘制行为<br>除了UITextField对象的风格选项，你还可以定制化UITextField对象，为他添加许多不同的重写方法，来改变文本字段的显示行为。这些方法都会返回一个CGRect结构，制定了文本字段每个部件的边界范围。以下方法都可以重写。<br>– textRectForBounds:　　  　//重写来重置文字区域<br>– drawTextInRect:　　      　//改变绘文字属性.重写时调用super可以按默认图形属性绘制,若自己完全重写绘制函数，就不用调用super了.<br>– placeholderRectForBounds:　　//重写来重置占位符区域<br>– drawPlaceholderInRect:　　//重写改变绘制占位符属性.重写时调用super可以按默认图形属性绘制,若自己完全重写绘制函数，就不用调用super了.<br>– borderRectForBounds:　　//重写来重置边缘区域<br>– editingRectForBounds:　　//重写来重置编辑区域<br>– clearButtonRectForBounds:　　//重写来重置clearButton位置,改变size可能导致button的图片失真<br>– leftViewRectForBounds:<br>– rightViewRectForBounds:</p>
<p>####22.调整键盘<br>inputView //代替标准的系统键盘<br>inputAccessoryView //编辑时显示在系统键盘或用户自定义的inputView上面的视图</p>
<p>####23. delegate<br>类要遵守UITextFieldDelegate协议<br> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text.delegate = self;　声明text的代理是我，我会去实现把键盘往下收的方法 这个方法</span><br></pre></td></tr></table></figure></p>
<p>在UITextFieldDelegate里所以我们要遵守UITextFieldDelegate这个协议<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">- (BOOL)textFieldShouldReturn:(UITextField *)textField</span><br><span class="line">&#123;</span><br><span class="line">    [text resignFirstResponder];    //主要是[receiver resignFirstResponder]在哪调用就能把receiver（text）对应的键盘往下收</span><br><span class="line">return YES;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>代理方法<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br></pre></td><td class="code"><pre><span class="line">- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField&#123;　</span><br><span class="line">　　</span><br><span class="line">//返回一个BOOL值，YES代表允许编辑，NO不允许编辑.　</span><br><span class="line">    return YES;　</span><br><span class="line">&#125;　</span><br><span class="line"> </span><br><span class="line">- (void)textFieldDidBeginEditing:(UITextField *)textField&#123;　</span><br><span class="line"> //开始编辑时触发，文本字段将成为first responder　</span><br><span class="line">&#125;　</span><br><span class="line"> </span><br><span class="line">- (BOOL)textFieldShouldEndEditing:(UITextField *)textField&#123;　</span><br><span class="line">//返回BOOL值，指定是否允许文本字段结束编辑，当编辑结束，文本字段会让出first responder　</span><br><span class="line">　 //要想在用户结束编辑时阻止文本字段消失，可以返回NO　，返回NO，点击键盘的返回按钮会无效果。</span><br><span class="line">　 //这对一些文本字段必须始终保持活跃状态的程序很有用，比如即时消息　</span><br><span class="line">　 </span><br><span class="line">    return NO;　</span><br><span class="line">&#125;　</span><br><span class="line">- (void)textFieldDidEndEditing:(UITextField *)textField;&#123;</span><br><span class="line"> </span><br><span class="line">&#125;// 上面返回YES后执行;上面返回NO时有可能强制执行(e.g. view removed from window)</span><br><span class="line"> </span><br><span class="line">- (BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string&#123;　</span><br><span class="line">//当用户使用自动更正功能，把输入的文字修改为推荐的文字时，就会调用这个方法。　</span><br><span class="line">//这对于想要加入撤销选项的应用程序特别有用　</span><br><span class="line">//可以跟踪字段内所做的最后一次修改，也可以对所有编辑做日志记录,用作审计用途。　　 </span><br><span class="line">//要防止文字被改变可以返回NO　</span><br><span class="line">//这个方法的参数中有一个NSRange对象，指明了被改变文字的位置，建议修改的文本也在其中　</span><br><span class="line"> </span><br><span class="line">　   return YES;　</span><br><span class="line">&#125;　</span><br><span class="line"> </span><br><span class="line">- (BOOL)textFieldShouldClear:(UITextField *)textField&#123;　</span><br><span class="line"> </span><br><span class="line">//返回一个BOOL值指明是否允许根据用户请求清除内容　</span><br><span class="line">//可以设置在特定条件下才允许清除内容　</span><br><span class="line"> </span><br><span class="line">　   return YES;　</span><br><span class="line">&#125;　</span><br><span class="line"> </span><br><span class="line">-(BOOL)textFieldShouldReturn:(UITextField *)textField&#123;　</span><br><span class="line"> </span><br><span class="line">//返回一个BOOL值，指明是否允许在按下回车键时结束编辑　</span><br><span class="line"> //如果允许要调用resignFirstResponder 方法，这回导致结束编辑，而键盘会被收起[textField resignFirstResponder];</span><br><span class="line">//查一下resign这个单词的意思就明白这个方法了　</span><br><span class="line">　   return YES;　</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>####24.通知<br>UITextField派生自UIControl，所以UIControl类中的通知系统在文本字段中也可以使用。除了UIControl类的标准事件，你还可以使用下列UITextField类特有的事件</p>
<ul>
<li>UITextFieldTextDidBeginEditingNotification</li>
<li>UITextFieldTextDidChangeNotification</li>
<li>UITextFieldTextDidEndEditingNotification</li>
</ul>
<p>当文本字段退出编辑模式时触发。通知的object属性存储了最终文本。</p>
<p>因为文本字段要使用键盘输入文字，所以下面这些事件发生时，也会发送动作通知</p>
<ul>
<li>UIKeyboardWillShowNotification 　//键盘显示之前发送</li>
<li>UIKeyboardDidShowNotification  　//键盘显示之后发送</li>
<li>UIKeyboardWillHideNotification 　//键盘隐藏之前发送</li>
<li>UIKeyboardDidHideNotification  　//键盘隐藏之后发送</li>
</ul>
<p>####25.Stroyboard中：<br>1)、Text ：设置文本框的默认文本。<br>2)、Placeholder ： 可以在文本框中显示灰色的字，用于提示用户应该在这个文本框输入什么内容。当这个文本框中输入了数据时，用于提示的灰色的字将会自动消失。<br>3)、Background ：<br>4)、Disabled ： 若选中此项，用户将不能更改文本框内容。<br>5)、接下来是三个按钮，用来设置对齐方式。<br>6)、Border Style ： 选择边界风格。<br>7)、Clear Button ： 这是一个下拉菜单，你可以选择清除按钮什么时候出现，所谓清除按钮就是出一个现在文本框右边的小 X ，你可以有以下选择：<br>    a. Never appears ： 从不出现<br>    b. Appears while editing ： 编辑时出现<br>    c. Appears unless editing ：<br>    d. Is always visible ： 总是可见<br>8)、Clear when editing begins ： 若选中此项，则当开始编辑这个文本框时，文本框中之前的内容会被清除掉。比如，你现在这个文本框 A 中输入了 “What” ，之后去编辑文本框 B，若再回来编辑文本框 A ，则其中的 “What” 会被立即清除。<br>9)、Text Color ： 设置文本框中文本的颜色。<br>10)、Font ： 设置文本的字体与字号。<br>11)、Min Font Size ： 设置文本框可以显示的最小字体（不过我感觉没什么用）<br>12)、Adjust To Fit ： 指定当文本框尺寸减小时，文本框中的文本是否也要缩小。选择它，可以使得全部文本都可见，即使文本很长。但是这个选项要跟 Min Font Size 配合使用，文本再缩小，也不会小于设定的 Min Font Size 。<br>接下来的部分用于设置键盘如何显示。<br>13)、Captitalization ： 设置大写。下拉菜单中有四个选项：<br>    a. None ： 不设置大写<br>    b. Words ： 每个单词首字母大写，这里的单词指的是以空格分开的字符串<br>    c. Sentances ： 每个句子的第一个字母大写，这里的句子是以句号加空格分开的字符串<br>    d. All Characters ： 所以字母大写<br>14)、Correction ： 检查拼写，默认是 YES 。<br>15)、Keyboard ： 选择键盘类型，比如全数字、字母和数字等。<br>16)、Appearance：<br>17)、Return Key ： 选择返回键，可以选择 Search 、 Return 、 Done 等。<br>18)、Auto-enable Return Key ： 如选择此项，则只有至少在文本框输入一个字符后键盘的返回键才有效。<br>19)、Secure ： 当你的文本框用作密码输入框时，可以选择这个选项，此时，字符显示为星号。</p>
<ul>
<li>Alignment Horizontal 水平对齐方式</li>
<li>Alignment Vertical 垂直对齐方式</li>
<li>用于返回一个BOOL值　输入框是否 Selected(选中) Enabled(可用) Highlighted(高亮)</li>
</ul>
<p>####26.UITextField实例一 ： </p>
<p>#####UITextField限制字符 (只为数字)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line">#define ALPHA @&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz &quot;  </span><br><span class="line">#define NUMBERS @&quot;0123456789n&quot;  </span><br><span class="line">#define ALPHANUM @&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &quot;  </span><br><span class="line">#define NUMBERSPERIOD @&quot;0123456789.&quot;  </span><br><span class="line">  </span><br><span class="line">  </span><br><span class="line">- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string  </span><br><span class="line">&#123;  </span><br><span class="line">NSCharacterSet *cs;  </span><br><span class="line">cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERSPERIOD ] invertedSet]; //invertedSet 方法是去反字符,把所有的除了数字的字符都找出来  </span><br><span class="line">  </span><br><span class="line">NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs] componentsJoinedByString:@&quot;&quot;];  //componentsSeparatedByCharactersInSet 方法是把输入框输入的字符string 根据cs中字符一个一个去除cs字符并分割成单字符并转化为 NSArray, 然后componentsJoinedByString 是把NSArray 的字符通过 &quot;&quot;无间隔连接成一个NSString字符 赋给filtered.就是只剩数字了.  </span><br><span class="line">  </span><br><span class="line">  </span><br><span class="line">BOOL basicTest = [string isEqualToString:filtered];  </span><br><span class="line"> if(!basicTest)   </span><br><span class="line">  </span><br><span class="line">        &#123;  </span><br><span class="line">            UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@&quot;提示&quot;  </span><br><span class="line">                                                            message:@&quot;请输入数字&quot;  </span><br><span class="line">                                                           delegate:nil  </span><br><span class="line">                                                  cancelButtonTitle:@&quot;确定&quot;  </span><br><span class="line">                                                  otherButtonTitles:nil];  </span><br><span class="line">              </span><br><span class="line">            [alert show];  </span><br><span class="line">            [alert release];  </span><br><span class="line">            return NO;  </span><br><span class="line">        &#125;      </span><br><span class="line">  </span><br><span class="line">// Add any predicate testing here  </span><br><span class="line">return basicTest;  </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>#define NUMBERS @”0123456789n” （这个代表可以输入数字和换行，请注意这个n，如果不写这个，Done按键将不会触发，如果用在SearchBar中，将会不触发Search事件，因为你自己限制不让输入n，好惨，我在项目中才发现的。） 所以，如果你要限制输入英文和数字的话，就可以把这个定义为： #define kAlphaNum @”ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789″。 当然，你还可以在以上方法return之前，做一提示的，比如提示用户只能输入数字之类的。如果你觉得有需要的话。</p>
<p>#####实例：限制只能输入一定长度的字符<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;   </span><br><span class="line">&#123;　//string就是此时输入的那个字符 textField就是此时正在输入的那个输入框 返回YES就是可以改变输入框的值 NO相反  </span><br><span class="line">　    </span><br><span class="line">if ([string isEqualToString:@&quot;n&quot;])　//按回车可以改变  </span><br><span class="line">    &#123;   </span><br><span class="line">        return YES;   </span><br><span class="line">    &#125;   </span><br><span class="line">   </span><br><span class="line">    NSString * toBeString = [textField.text stringByReplacingCharactersInRange:range withString:string]; //得到输入框的内容  </span><br><span class="line">   </span><br><span class="line">    if (self.myTextField == textField)　//判断是否时我们想要限定的那个输入框  </span><br><span class="line">    &#123;   </span><br><span class="line">        if ([toBeString length] &gt; 20) &#123; //如果输入框内容大于20则弹出警告  </span><br><span class="line">  textField.text = [toBeString substringToIndex:20];   </span><br><span class="line">            UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:nil message:@&quot;超过最大字数不能输入了&quot; delegate:nil cancelButtonTitle:@&quot;Ok&quot; otherButtonTitles:nil, nil] autorelease];   </span><br><span class="line">            [alert show];   </span><br><span class="line">            return NO;   </span><br><span class="line">        &#125;   </span><br><span class="line">    &#125;   </span><br><span class="line">    return YES;   </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>####27.UITextField实例二：<br>在UISearchBar中,当输入信息改变时,它就会调用textDidChange函数,但是UITextField没有这个功能,唯一与这个类似的shouldChangeCharactersInRange函数,也是在文件还没有改变前就调用了,而不是在改变后调用,要想实现这个功能,我们可以增加事件监听的方式.先来看看objective-c提供的接口:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">// add target/action for particular event. you can call this multiple times and you can specify multiple target/actions for a particular event.  </span><br><span class="line">给特殊事件添加目标或者方法，你能够调用这个方法多次，给特殊事件指定很多目标或者方法</span><br><span class="line">// passing in nil as the target goes up the responder chain. The action may optionally include the sender and the event in that order  </span><br><span class="line">给target传递空，会建立响应链，在这行命令，方法可以选择包含方法发送者和事件两个参数。</span><br><span class="line">// the action cannot be NULL.   方法不能为空。</span><br><span class="line">- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;</span><br></pre></td></tr></table></figure></p>
<p> 怎么去使用这个接口呢?主要分为两步,第一步就是在UItextField组件中增加对文件编辑改变时事件的监听,然后再实现监听器监听到事件时,所调用的方法.<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">//第一步,对组件增加监听器 可以在viewDidLoad 方法中加入 textField 为你自定义输入框的名称  </span><br><span class="line">[textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];  </span><br><span class="line">...  </span><br><span class="line">//第二步,实现回调函数  </span><br><span class="line">- (void) textFieldDidChange:(id) sender &#123;  </span><br><span class="line">    UITextField *_field = (UITextField *)sender;  </span><br><span class="line">    NSLog(@&quot;%@&quot;,[_field text]);  </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>####28.UITextField实例三：<br>UITextField控件处理键盘弹出时遮住输入框的问题<br>打开键盘卷动文本字段<br>默认情况下打开键盘会遮住下面的view，带来一点点困扰，不过这不是什么大问题，我们使用点小小的手段就可以解决。</p>
<p>首先我们要知道键盘的高度是固定不变的，不过在IOS 5.0 以后键盘的高度貌似不是216了，不过不要紧，我们调整调整就是了：</p>
<pre><code>iPhone    ipad
</code></pre><p>竖屏(portrait)    216    264<br>横屏(landScape)    140    352</p>
<p>我们采取的方法就是在textField(有可能是其他控件)接收到弹出键盘事件时把self.view整体上移216px了(我们就以iPhone竖屏为例了)。<br>首先我们要设置textField的代理，我们就设为当前控制器了。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">textField,delegate=self;</span><br></pre></td></tr></table></figure>
<p>然后我们在当前控制器实现下面两个委托方法：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">- (void)textFieldDidBeginEditing:(UITextField *)textField  </span><br><span class="line">&#123; //当点触textField内部，开始编辑都会调用这个方法。textField将成为first responder   </span><br><span class="line">       NSTimeInterval animationDuration = 0.30f;      </span><br><span class="line">      CGRect frame = self.view.frame;  </span><br><span class="line">      frame.origin.y -=216;  </span><br><span class="line">      frame.size.height +=216;  </span><br><span class="line">      self.view.frame = frame;  </span><br><span class="line">       [UIView beginAnimations:@&quot;ResizeView&quot; context:nil];  </span><br><span class="line">          [UIView setAnimationDuration:animationDuration];  </span><br><span class="line">       self.view.frame = frame;                  </span><br><span class="line">       [UIView commitAnimations];                  </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">- (BOOL)textFieldShouldReturn:(UITextField *)textField   </span><br><span class="line">&#123;//当用户按下ruturn，把焦点从textField移开那么键盘就会消失了  </span><br><span class="line">        NSTimeInterval animationDuration = 0.30f;  </span><br><span class="line">        CGRect frame = self.view.frame;      </span><br><span class="line">        frame.origin.y +=216;        </span><br><span class="line">        frame.size. height -=216;     </span><br><span class="line">        self.view.frame = frame;  </span><br><span class="line">        //self.view移回原位置    </span><br><span class="line">        [UIView beginAnimations:@&quot;ResizeView&quot; context:nil];  </span><br><span class="line">        [UIView setAnimationDuration:animationDuration];  </span><br><span class="line">        self.view.frame = frame;                  </span><br><span class="line">        [UIView commitAnimations];  </span><br><span class="line">        [textField resignFirstResponder];     </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/08/06/iOS-UI/iOS-UITableView(列表)/" rel="next" title="iOS-UITableView(列表)">
                <i class="fa fa-chevron-left"></i> iOS-UITableView(列表)
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/08/06/iOS-UI/iOS-UIWebView使用/" rel="prev" title="iOS-UIWebView使用">
                iOS-UIWebView使用 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/images/avatar.jpeg"
                alt="凌浩雨" />
            
              <p class="site-author-name" itemprop="name">凌浩雨</p>
              <p class="site-description motion-element" itemprop="description">专业从事于移动端开发，Android与iOS均有涉及，主做Android开发与React Native开发</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">393</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link" href="#19-delegate"><span class="nav-number">1.</span> <span class="nav-text">19. delegate</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">凌浩雨</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
